import request from '@/config/request'

export function dicdatalist(query) {
    return request({
        url: '/basic/dictionaries-data/list',
        method: 'get',
        params: query
    })
}

// 新增菜单
export function addDicdata(data) {
    return request({
        url: '/basic/dictionaries-data',
        method: 'post',
        data: data
    })
}

// 修改菜单
export function updateDicdata(data) {
    return request({
        url: '/basic/dictionaries-data',
        method: 'put',
        data: data
    })
}
export function getDicdata(id) {
    return request({
        url: '/basic/dictionaries-data/'+id,
        method: 'get',
    })
}


export function getDicdataByType(type) {
    return request({
        url: '/basic/dictionaries-data/dicdataByType?type='+type,
        method: 'get',
    })
}

// 删除菜单
export function delDicdata(id) {
    return request({
        url: '/basic/dictionaries-data/'+id,
        method: 'delete'
    })
}